package com.example.project.model;


import com.example.project.model.config.IEnum;

/**
 * Created by cqh on 17-9-5.
 */
public class ResultObject<T>{

    /***时间戳*/
    long timestamp= System.currentTimeMillis();

    /***访问状态*/
    int status=200;

    /***处理结果*/
    String error="SUCCESS";

    /***处理异常*/
    String exception;

    /***处理结果消息*/
    String message="处理成功";

    String path;

    /**数据集*/
    T data;

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setIenum(IEnum ienum){
        this.error=ienum.getCode();
        this.message=ienum.getValue();

    }
}
